using System;
using System.Collections;
using System.Collections.Generic;
using NHibernate.Criterion;

namespace FwkLight.Domain.Fetching
{
  public class FetchingFilterIn: FetchingFilter
  {
    public FetchingFilterIn(string propertyName, object value, IFetchingPart parent) : base(propertyName, value, parent)
    {
    }

    public override void ApplyFilterOn(DetachedCriteria criteria)
    {
      criteria.Add(Restrictions.In(Parent.Alias + "." + PropertyName, (ICollection)Value));
    }
  }
}